//
//  Contoller.h
//  iMAL
//
//  Created by Stefano Pigozzi on 1/30/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "PGZWindow.h"
#import "MALHandler.h"
#import "iMAL_AppDelegate.h"
#import "NSManagedObjectContext+FastFetch.h"
#import "NSWindow+Resize.h"

@interface Contoller : NSObject {
	// windows
	IBOutlet PGZWindow* mainWindow;
	IBOutlet NSWindow * progressSheet;

	// outlets
	IBOutlet MALHandler * mal;
	IBOutlet iMAL_AppDelegate * app_delegate;
	IBOutlet NSArrayController * animes;
	
	//predicates flag
	BOOL watchingFlag;
	BOOL holdFlag;
	BOOL completedFlag;
	BOOL droppedFlag;
	BOOL planFlag;
	NSString * searchString;
	
	//sort descriptor
	NSArray * sort;
	
	
}

@property (retain) MALHandler * mal;
@property (retain) iMAL_AppDelegate * app_delegate;

@property (assign) BOOL watchingFlag;
@property (assign) BOOL holdFlag;
@property (assign) BOOL completedFlag;
@property (assign) BOOL droppedFlag;
@property (assign) BOOL planFlag;
@property (retain) NSString * searchString;

@property (retain) NSArray * sort;


-(void)constructPredicate;
-(void) showProgressSheet;

-(IBAction) import:(id) sender;
-(IBAction) cancelImport:(id) sender;

@end
